package com.woniu.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.commons.exception.YogaException;
import com.woniu.model.dto.LeagueClassDto;
import com.woniu.model.dto.MyCourseDto;
import com.woniu.model.model.YLeagueClass;
import com.woniu.model.param.*;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author 吴彦祖
 * @since 2024年05月23日
 */
public interface YLeagueClassService extends IService<YLeagueClass> {

    /**
     * 查询团课集合
     *
     * @return
     */
    public List loadListLeagueClass() throws YogaException;

    /**
     * 新增团课
     *
     * @param param：leagueClassName：团课名；coachId：教练名；peopleNum：课程容纳人数；venueId：场馆id；price：价格；minute：分钟数(课程时长)；classTypeId：课程类型id；leagueClassState：0.已取消1.可预约2.预约满3.已完课；leagueClassDetail：课程描述；classroomId：教室id；classNum：课程数量（节）
     * @return
     * @throws YogaException
     */
    public void addLeagueClass(LeagueClassAddParam param) throws YogaException;

    /**
     * 修改团课状态为已完课：
     *
     * @param param：leagueClassId：团课id；leagueClassState：状态
     * @return
     * @throws YogaException
     */
    public void updateLeagueClassState(LeagueClassUpdateStateParam param) throws YogaException;


    /**
     * 通过团课Id查一个团课
     *
     * @param id：团课id
     * @return
     */
    public YLeagueClass ByIdLeagueClass(Integer id) throws YogaException;

    /**
     * 删除团课
     *
     * @param leagueClassId：团课id
     * @return
     * @throws YogaException
     */
    public void deleteLeagueClassState(Integer leagueClassId) throws YogaException;

    /**
     * 通过教练Id查该教练的团课
     *
     * @param coachId：教练id
     * @return
     */
    public List CoachByIdLeagueClass(Integer coachId) throws YogaException;


    /**
     * 通过场馆Id查该场馆的团课
     *
     * @param venueId：场馆id
     * @return
     */
    public List VenueByIdLeagueClass(Integer venueId) throws YogaException;

    /**
     * 分页查询所有团课
     * @param
     * @return
     * @throws Exception
     */
    public Page<LeagueClassDto> pageAllLeagueClass(PageAllLeagueClassParam param)throws YogaException;

    /**
     * 根据教练ID查询自己团课的详情
     *
     * @return
     * @throws YogaException
     */
    Page<MyCourseDto> CoachLeagueClassMessage(CoachMessageParam param)throws YogaException;


    /**
     * 场馆端分页查询自己场馆的所有团课
     * @param
     * @return
     * @throws Exception
     */
    Page<LeagueClassDto> VenuePageMyLeagueClass(VenuePageLeagueClassParam param);

    void VenuePutawayLeagueClass(Integer leagueClassId, Integer venueId);

    /**
     * 查询团课集合,带团课名搜索条件查询
     * @return
     */
    public List loadListByLeagueClass(String LeagueClassName);

    List<YLeagueClass> loadAllLeagueClass();

    List<YLeagueClass> loadLeagueClassByName(String leagueClassName);
}
